//
//  UpdateViewController.h
//  XRmenu
//
//  Created by Chow Akins on 11-11-23.
//  Copyright 2011年 foxhis. All rights reserved.
//

#import "AllInclude.h"
#import "XRmenuHelper.h"
#import "XRmenu_HDAppDelegate.h"
#import "Business.h"
#import "UIDevice+serialNumber.h"
#import "XRProgressBarView.h"

@interface UpdateViewController : UIViewController {
	UILabel *tableUpdateLabel;
	NSString *firstMessage;
    NSString *exceptionMessage;
	NSInteger curIndex;
	NSInteger fileCount;
	XRProgressBarView *progressbar;
    
    NSString *departmentId; //部门编号
}
@property (nonatomic, retain) UILabel *tableUpdateLabel;
@property (nonatomic, retain) NSString *firstMessage;
@property (nonatomic, retain) NSString *exceptionMessage;
@property (nonatomic, assign) NSInteger curIndex;
@property (nonatomic, assign) NSInteger fileCount;
@property (nonatomic, retain) XRProgressBarView *progressbar;
@property (nonatomic, retain) NSString *departmentId;

-(void)startBackgroundJob; //Thread
-(void)handleUpdateProgress:(NSNotification *)notification;
-(void)startUpdate;
-(void)UpdateProgress:(id)sender;


-(BOOL) XRmenuDataBaseUpdate:(NSString *)baseUrl Error:(XRmenuError **)outError;
-(BOOL) XRmenuFilesUpdate:(NSString *)baseUrl Error:(XRmenuError **)outError;
-(BOOL) XRmenuTablesUpdate:(NSString *)baseUrl Error:(XRmenuError **)outError;
-(BOOL) XRmenuSpecialSortUpdate:(NSString *)baseUrl Error:(XRmenuError **)outError;
-(BOOL) XRmenuOEMPictureUpdate:(NSString *)baseUrl Error:(XRmenuError **)outError;
@end
